1. Field of the Invention
This invention generally relates to the field of image processing. More particularly, the present invention relates to a method and computer-readable medium for detecting motion and filtering noise from images and reducing the amount of operations in comparing images by employing block processing.
2. Description of the Prior Art
Motion detection has been introduced by various papers, literature, and patent specifications, and so on. The majority of motion detection techniques work on the principle of comparing an incoming image to a stored reference image. One common method is to subtract the value of each pixel of an incoming image from the corresponding pixel in the reference image, accumulate the resulting difference, and generate a motion indication while the accumulated difference value exceeds some predetermined thresholds. However, a problem with this approach is that values in the differences between all pixels contained in the incoming image and all pixels contained in the reference image are calculated. The sum of values in the differences needs to be calculated for each pixel, hence the amount of calculation is exorbitant and a powerful floating-point unit (FPU) and high-speed computational speeds are necessary.
Besides, noise sometimes can cause a wrong motion indication. For example, an area brightness variation or the moire caused from a camera sensor between the incoming image and the reference image makes the sum of values in the differences abruptly exceed the predetermined threshold, but actually no motion has occurred. Hence, this kind of noise needs to be filtered out in order to improve the precision of motion detection.
In view of the drawbacks mentioned with the prior art in motion detection, there is a continued need to develop a new and improved motion detection method that overcomes the disadvantages associated with motion detection in the prior art. The advantages of this invention are that it solves the problems mentioned above.